
import {getToken,getLanguage} from '@/util/tokeCookien.js'
export function showModalLogin() {
	var title='提示'
	var content='您尚未登录，是否登录?'
	var cancelText='取消'
	var confirmText='确定'
	if(getLanguage()==2){
		title='Tips'
		content='You are not logged in. Do you want to log in?'
		cancelText='No'
		confirmText='Yes'
	}else{
		title='提示'
		content='您尚未登录，是否登录?'
		cancelText='取消'
		confirmText='确定'
	}
	if(!getToken()){
		return uni.showModal({
			title: title,
			content: content,
			cancelText:cancelText,
			confirmText:confirmText,
			success: function(res) {
				if (res.confirm) {
					uni.navigateTo({
						url: `/pages/login/login`
					})
				}
			}
		});
	}
	  
}
